(function() {
    $(function () {
        setFooterPlace();
        $(window).bind('resize', setFooterPlace);
    });
    function setFooterPlace() {
        var footer = $('#footer');
        var win = $(window);
        var doc = $('body');
        if (win.height() >= doc.height()) {
            footer.addClass('footerBottom');
        } else {
            footer.removeClass('footerBottom');
        }
        footer.removeClass('hide');
    }
})();
